package com.iss.demo.service;

import com.iss.demo.dao.fourCourseDao;
import com.iss.demo.entity.fourCourse;
import com.iss.demo.model.fourCourseModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class fourCourseService {
    @Autowired
    private fourCourseDao dao;

    public List<fourCourseModel> selectAll(){
        List<fourCourseModel> list = new ArrayList<>();
        list = dao.selectAll();
        return list;
    }

    public Integer delete(Integer f_ids[]){
        return dao.delete(f_ids);
    }

    public fourCourse selectById(Integer id){return dao.selectByid(id);}
    public Integer insertCourse(fourCourse fourcourse){
        return dao.insertCourse(fourcourse);
    }
    public Integer updateCourse(fourCourse fourcourse){
        return dao.updateCourse(fourcourse);
    }
    public Integer updatefourCourseInfo(String surface,String info ,Integer id){
        return dao.updateInfo(surface,info,id);
    }
}
